add double tag to array gen
make copy2buffer add string terminator
add condition checking for publisher update