Engineering a Sort Function (citeseer.ist.psu.edu)