Finished Programming assignment 2