Realized the scrolling functionality