more stable script