added sort function of list