genreal refactoring.