added other sort function