Rewrite the whole script