added example of using a custom comparator