reduced getOptions function complexity