Write up problem 4