changed search to use TotalOrd