add writer
implement writer