Add Pretest, PH optimization to be added