Add optimized version