making writer into a module