fixed the factory stuff