refactored tools