small changes to factory