refactor examples