added basic graph algo