updated row_cnt check