add while and for snippet