def make_subselect(values, selected, display=None):
    """
    Function to create the (inner)) html for a drop down list (<select>)
    
    values: the list of options as seen by the app - displayed to the user if display is None
    
    selected: the current value - if display is present, one of display, otherwise one of choices
    
    display:  if present, this is the list the user will see 
    """
    if display is None:
        return ''.join(['<option{sel}>{val}</option>'.format(sel=' selected ' if item == selected else '', val=item)  for item in values])
    else:
        assert len(display)==len(values)
        return ''.join(['<option name="{}"{}>{}</option>'.format(name, ' selected ' if name == selected else '', disp)  for name, disp in zip(values, display)])