shotop: adds functions to perform the various sorts on the master file