basic adjacency list graph implementation