Using enumerate() in for loop instead of iterating over length of vector.