refactored unit_test out of prime_test