Change |i| to |event|