add and remove devices