pagination and sorting added