applied peter's diff