minor optimization for vectors