overall refactoring