added smooth scrolling function.fixing smooth scrolling