Add sorting helper.