fixed write visitor
compiles