remove redundant setOptimized