standalone refactoring