update
improved writeDot