added limit/offset and query handling up to 11k