This implements my version of the sort method - this is a mid chapter exercise in chapter 10