added interface for pathfind and made non static