w/ tests for graph

w/ tests for graph