restructure detach for nb consensus