basic example of refactoring