solved problem 17