use better current path determine algorithm