added scrollPos to know how far we have scrolled