remove bad sort function