added basic graph code