rearray the sequence to join