added scrolling function and page updates