finish problem 31