updated temp writing