Re-indent these two functions to make it actually possible to understand their