changed fromExpr(ex) to NodeTemplate(ex)