add multi-graph support