added pagination and ordering