added codes to the querytree class and the queryOptimizer class