Add checking for number of prime factors