solves problem 6