changed to nonrecursive primefac