added checks for p_good; new binary