fixing indentation and adding comments