rudimentary path-finding algorithm established