Write up problem 6