taking max over a trajectory, thus reducing variance.