implementing entire comparison