add support for for-each loops (converted to c++ while loop)