added correct writer to csv