handle arbitrary scrolls up or down