prime_factors method