Aravind,Mansi | refactoring around insert and upsert