solved problem 46