adding comments & code cleaning up