tools refactoring