Changed the factory class