some bookkeeping added so that devices can be attached