add if,do and event