pagination switch modified