Rather than calling the `i` outside the scope of the `.each`, you can actually call `each_with_index` for this exact purpose:

```ruby
@compliance_tasks.each_with_index do |task, i|
  if task.category == "Setup"
    puts"#{i}. #{task.to_s}"
  end
end
```