a api for writing settings