added basic functionallity for infinite scrolling