Need to pass sortFunction