refactor tools