refactoring for dot language converting
change for neighbor joining