Added second comparison function