improved clearRows() to be much more efficient