shortened the update_settings logic as per brian's suggestion