checking alignment after sorting