First example code for refactoring