implement witness checking for @[wd_i].