rewrote setup script