formatting and comments updated