second commit. finished problem 2.  Working on problem 3.