used upsert and save