global alignment and edit distance