def repl_preadd(name: str, old: str, new: str):
    """
    if the string old is in the string name, it is removed, and the string new
    is addded at the beginning of the string name
    the updated string is returned
    """
    if old in name:
        name = name.replace(old, '')
        name = new + name
    return name