add module-writer class (fixes #7)