def METHOD_NAME(self, sk, ct):
    K, dfaM = sk['K'], sk['dfaM']
    C, w = ct['C'], ct['w']
    l = len(w)
    B = {}
    # if DFA does not accept string, return immediately
    if not dfaObj.accept(dfaM, w):
        print("DFA rejects: ", w)
        return False
    Ti = dfaObj.getTransitions(dfaM, w) # returns a tuple of transitions 
    B[0] = pair(C[0][1],  K['start1']) * (pair(C[0][2], K['start2']) ** -1)
    for i in range(1, l+1):
        ti = Ti[i]
        if debug: print("transition: ", ti)
        B[i] = B[i-1] * pair(C[i-1][1], K[str(ti)][1]) * (pair(C[i][2], K[str(ti)][2]) ** -1) * pair(C[i][1], K[str(ti)][3])
    x = dfaObj.getAcceptState(Ti) # retrieve accept state
    Bend = B[l] * (pair(C['end1'], K['end'][str(x)][1]) ** -1) * pair(C['end2'], K['end'][str(x)][2]) 
    M = C['m'] / Bend  
    return M