first version of Programming Assignment 2 almost done