implemented setting writing