compare and update modification