implement row and colum checker