Implemented JoinOptimizer #2