book refactoring added restriction