adjust to external tool rewrite