improve matching to match against links to shift codes