implementing smooth scroll layout