added detect.fromAst