def clean_for_geocode(orig_str):
    """
    Remove punctuation and stopwords at the end of the string only, repeatedly.
    :param orig_str: original string
    :return: clean string, ready to be geocoded
    """
    stopwords = ['in', 'the', 'upon', 'of', 'at', 'within', 'to', 'along', 'near']
    prev_len = len(orig_str)
    clean_str = orig_str
    while True:
        clean_str = clean_str.strip(" (,).")
        # remove stopwords at the end of the word
        if clean_str.split(" ")[-1] in stopwords:
            clean_str = " ".join(clean_str.split(" ")[0:-1])
        if len(clean_str) == prev_len:
            break
        prev_len = len(clean_str)
    return clean_str