added ce and ee optimizations