wip
decoder ok, not writing