modified reader/writer to use a settings class