Trying to implement adjacency lists