refactoring extension