practice for refactoring