added code to handle changing options using the options tab.