improvements in dot generation