special case range queries for speed