update join and detach