foreach_2 modified