use C++ std function for max()