data update + some writing