scripts optimized