added function to reset pagination