Added setOptions function