added optimization script