p must be a prime!