Example code from Fowler used for refactoring