setOption() method refactored.