Second submission for ProgrammingAssignment2