factorizing working