updated comments, fixed incrementing problem, fixed formatting