added writer and remove extra