finish up problem 6