redundant sort removed