changed write pattern