updated formatting and comments