fancy comparison functionality