use other dimension of matrix for number of elements (for future use)