add best-fit
use more std::next
test more in main