solved problem 41