Code example taken from book "Refactoring"(Martin Fowler).