Is there a way to do this with one indexing step? (Making fewer copies of the data...)