hopefully the last std::min