Modified method to create devices to allow specifying device name