change the termination condition of phase 2