change flist_sort return type