fixed formatting and clarified comments