Working sequence algorithm - working on returning alignment