modify script, thank you @geta6