completed infinite scroll function