changed update to upsert for settings in case settings hasnt ever been set up