added comments, fixed formatting