add std before max() functions
Merge pull request #1 from vbkaisetsu/std-before-max

Added std before max() functions