Finished with selection.cpp (Fig 1 reproduction).