moved factory methods from bundle to factory.