rewrite the install script