added some methods on pagination + tests