reduced complexity of the getOptions function