Use enumerate instead of mutation