Adde a new error.
Added checkMatrix().
Added the declaration for checkMatrix().