solution problem 6