added support for limit and offset based pagination