Should not subtract one from p.