rearrange functions and indents