Optimized var in carousel