adjust adjmatrix