foreach loop was checking the global counter

changed to the town one :D