combine two graphs into one