add attach/detach cases