almost done with problem 2