adding comments and formatting my code