added trimming of adjacency list