add variable substitutions on "b" "c" and "d" in ex().