assignment 2 complete and tested