junky code before redo in nth_prime
Completed nth_prime