extra prime number generation code