more JoinOptimizer

not fully working