remove old optimization code
add optimization for basic arithmetic