finish problem 47