Added overall comparison function