solved problem 27