add TreeCreatingVisitor and unit test