solved problem 8