add support for integer indices and range queries