add some function to control the scroll