separated out path-finding