updating to use direct vector indices instead of accessor