You don't need `count == 0.0`. `currMax(id)` is `Double.MinValue` if `count == 0.0`.