optimizerBase refactor