setDefaultOptions refactor