Changed custom writers from methods to functions