Adapted to new indexing interface