finished problem 7