Added first implementation to get factors.