added upsert ability to datastore update, field formatting