script improvements for scrolling