added genCode iterate statement