problem 47 complete