almost compiling optimize exp