first implementation of scrolling