My assignment for ProgrammingAssignment2