add smoothScroll function