need to fix word_dict bug and generation