merge graph