solved problem 12