added dist and heal box pathfind functions