Completed Programming Assigment 2