working on instantiating factories