Add comparison function