Implemented 3rd test, made pass and then refactored to tidy up.