fix indentation and add comments