more versatile graph construction to allow both PBS graphs and VOGSL graphs