finished problem 1, still working on problem 2.