def find_handshape_old(string, handshape_base="", handshape_diacritic=""): # updated function above
    """
    Alternative version without re.
    """
    in_handshape = False
    handshapes = []
    rest = ''
    for char in string:
        if char in handshape_base:
            if in_handshape:
                handshapes[-1] += char # append to existing handshape
            else:
                in_handshape = True # switch on environment of handshape
                handshapes += [char] # append a new segment to the list
        elif char in handshape_diacritic: 
            if in_handshape:
                handshapes[-1] += char
        else:
            in_handshape = False
            rest += char
    return {'handshape': handshapes, "rest": rest}