refactored LazyScroll functions to be one function