Comments added to code in assignment 5