Doing ProgrammingAssignment2