write all data