make nucleus_end
works (except for split lines) with much faster algorithm