func writer