added switch,fixed AST