updating to use direct array indices for vectors
using vector items for performance