implemented the scroll feature