modify script and switch