Added hidden sort function.