change constructing AST to the way cooperating with phoenix