final code to get the preferential alignments