indexing over ranges