added soln to problem 7