generalized factorization lemma a bit