adding improvements to path finding