completed assignment and added comments