Factorization in non-leptonic decays of heavy mesons