Add optimized code