Add advanced pagination