finished hw assignment, added comments