finally created accurate diffmatrix