improve for in statement, change exitMessage event