Changed as per the ProgrammingAssignment2 instructions.