added the infinite scroll functionality