refactor of external tools