modify cmp function in sort_functs.cpp/h