basic graph functionality