adjusted comments and formatting