finish problem 3 partially