This can be defined outside foreach