Would it be possible to use a different variable name than `p`? (there are 5 separate things called `p` in this function.)