trying to program the matrix