optimization in condition table