polishing up the mate setup script