added leaves to adjacency list