made some changes to scrolling action