rewrite setup scripts