organizing the scrolling mechanism