actually finish problem 4