Updated initial code for ProgrammingAssignment2