Compare function update