finished the .dot output function