completed assignment 2, test code seems to work
completed assignment 2, test code seems to work. add more comments