rewrite the script block