adding pagination and infinite scroll