more efficient comparison