there are only 54 elements in numMatrix, so the for loop needs to be 54 or less