Added code to find all prime factors