added basic graph functions