started graph class based on adjacency list