tidy up problem 4