home page pagination functionality