solution to problem 46