additional refactoring to eliminate weak places
instance 0 is always present for the device