It's a bad practice, I just did a quick fix. It's better to declare it in the `for` than creating a global variable. I did a check and that method body is huge. I just made a quick fix based on the IDE warning.