update singleton and factory