fix cr-lf lf compatibility

starting of sort function