short-test path algo