some script adjustments