refactor  tools