added array support for setOption method