fixed/optimized scripts