Finished the assignment, added comments