refactoring stage 0 example