refactorings in examples