Implemented Diagonal Checking.