solved problem 16