update ProgrammingAssignment2 by my successful code