modify device factory