adjacency list problem solved