adding onScroll event