Completed assignment 2 and added comments