code in Martin Fowler refactoring Book