refactor writer go helpers, work on prob/04