Added setOption function