Infinte scrolling and mongodb API