added key attribute to device