path search algorithm updated