replacing max_prime_factor function call argument