removed JSONencoder from writer