modified the sort.c file so that all the sorting function in a uniform style