completing problem 6