Add helper function to update an option