nth_prime & minimanization implemented