compare function done update