fixed the dpmatrix call