write setup file, some minor changes