First graph implementation