added simple graph implementation