reuse all_indicies rather than copying