implement basic graph api