sort logic is changed