Changed for each to for in