First revision of programming assignment 2.