adj_mat, adj_tab finished