added writer class