converted the idfactory to an actual factory