changed to better build system from graph-search branch