detach method