add adjacency matrix