edit distance sequence tags and helpers