add on duplicate update to handle concurrency issues