example refactor