minor change should result in decent speed up to F# code

max is also a function in F#