adding generate Upsert