if it is correct, I would define this outside the `for` loop