decoding the matrix