std::min here too