can determine case (albeit slowly) and making comp fcn for biult-in sort