added pagination and sorting!