changes on foreach.py