basic path finding algorithm. very raw.