Final version of ProgrammingAssignment2