extension refactoring