Updated to the correct recent optimized code