refactor writer(s)