changed fmax to std::max