def add_warnings(pand_dict, timing, sat_level, flags, instrument):
    """Add warnings for front end 
    
    Adds in necessary warning flags for a JWST observation usually associated with 
    too few or too many groups or saturation. Alerts user if saturation level is higher 
    than 80 percent and if the number of groups is less than 5. Or, if the full well is 
    greater than 80. These warnings are currently very arbitrary. Will be updated as 
    better JWST recommendations are made. 
    
    Parameters
    ----------
    pand_dict : 
        output from pandeia run 
    timing : dict 
        output from **compute_timing** 
    sat_level : int or float 
        user specified saturation level in fractional (00/100)
    flags : dict 
        warning flags taken from output of **compute_timing**
    instrument : str 
        Only allowable strings are: "nirspec", "niriss", "nircam", "miri"
    
    Returns
    -------
    dict 
        all warnings 

    Notes
    -----    
    These are warnings are just suggestions and are not yet required.   
    """
    ngroups_per_int = timing['APT: Num Groups per Integration']
    try:
        flag_nonl = pand_dict['warnings']['nonlinear']
    except:
        flag_nonl = 'All good'
    try:
        flag_sat = pand_dict['warnings']['saturated']
    except:
        flag_sat = 'All good'
    flag_low = 'All good'
    flag_perc = 'All good'
    if (sat_level > 0.8) & (ngroups_per_int < 3):
        flag_low = '% full well>80% & only ' + str(ngroups_per_int) + ' groups'
    if sat_level > 0.8:
        flag_perc = '% full well>80%'
    warnings = {'Group Number Too Low?': flag_low, 'Group Number Too High?':
        flags['flag_high'], 'Non linear?': flag_nonl, 'Saturated?':
        flag_sat, '% full well high?': flag_perc, 'Num Groups Reset?':
        flags['flag_default']}
    return warnings
