corrections to the factory creation