changed write mode