solves problem 4