most of problem 2 in place and working