add onConflict method