support for alternate sorting function