small mod for prime.c