forgot to close foreach loop