modify the output of the dot backend and fix the bugs of dot frontend (currently slightly tested)