background refactoring