def toefl_words(testfile, wrddict):
    """
    Makes sure every word in the toefl test is in the dictionary.
    testfile: Toefl test filename.
    wrddict: word to index mapping.
    """
    toefls = []
    with open(testfile) as toefl:
        for line in toefl:
            toefls.extend(line.replace("(", "").replace(")", "").split())
    cnt = len(wrddict)
    for word in toefls:
        if word not in wrddict:
            wrddict[word] = cnt
            cnt += 1
    return wrddict