Perfected checkRow and checkColumn