sugars counter and optimizations