Attempting to use adjacency list pattern