added 'animate' parameter for scrolling functions