My implementation of the ProgrammingAssignment2