Using generic parameters for sample graphs and allowing adding on graph