adding scroller helper function