adjust smoothscroll and correct getPicture function