Use VECTOR_FOR_EACH instead of a manual loop