moved factoring algos to prod lib