I'm guessing from context that you don't always increment `p`?