Algorithms for aligning sequences