updated smoothscroll target calculation