old optimizer code removed