solved problem 38