basic graph building