if only called once, you could use an anonymous function passed into the sort.