added basic pathfinding.[ch]