build adjacency