Do the path finder working logic