change for each to simple for