fix indentation and function location