solved problem 42.