sort the function list