Added setOptions() function.