solved problem 7