script to put all sequences in the same direction