updated comments
added comments for functions
added author and comments
removed unused variables and added comments