Making the matrix work in our form