added getPaginated method