added is_prime, need to test, for some reason array[] is getting cached in prime factors