Update foreach