implemented Matrix Checker