add while for and foreach