Declaring a variable here doesn't seem necessary; why not just use 31 inline below? Or even use two different primes?