add basic graph functionalety