make cross_join as a tree