sort data, because subsequent code needed sorted data.  attempt to stop scrolling when beyond boundaries.