Yep, this is legacy code, but we I won't update it since Alberto has pending a PR that changes the way we do that loop.

So will wait for him to add the changes incrementally.

Thanks a lot!