showComparison function updated