init pagination for home