implement writing of the settings