add attach / detach support