refactoring scheme