update the option object when options are changed dynamically