Add graph new function