merge graph should work for all graphs