comments added to the solution of assignment 2