using Math.max / min. Increased some coverage too.