def _get_class(value, max):
    """Get the CSS class for the value and max such that higher values are better"""
    if value < (max * 0.33): return "bad"
    if value > (max * 0.67): return "good"
    return "okay"