toDOT method