Final revision of Programming Assignment2