device pagination and sorting