Move row limit logic to it's own method