add conflict resolution function.