sort by function call