forgot to end the foreach loop