change segment to component
add code to check that nfd and nrd are ready before leaving