nonreg: update code with test on number of cells