PathMerge pass test except TandemRepeat. TODO: skip TandemRepeat in pathmerge
diff --git a/genomix/genomix-pregelix/data/TestSet/PathMerge/BridgePath2/bin/.part-00000.crc b/genomix/genomix-pregelix/data/TestSet/PathMerge/BridgePath2/bin/.part-00000.crc
new file mode 100644
index 0000000..61345b4
--- /dev/null
+++ b/genomix/genomix-pregelix/data/TestSet/PathMerge/BridgePath2/bin/.part-00000.crc
Binary files differ
diff --git a/genomix/genomix-pregelix/data/TestSet/PathMerge/BridgePath2/bin/part-00000 b/genomix/genomix-pregelix/data/TestSet/PathMerge/BridgePath2/bin/part-00000
new file mode 100755
index 0000000..fe0d8d3
--- /dev/null
+++ b/genomix/genomix-pregelix/data/TestSet/PathMerge/BridgePath2/bin/part-00000
Binary files differ
diff --git a/genomix/genomix-pregelix/data/TestSet/PathMerge/BridgePath2/data b/genomix/genomix-pregelix/data/TestSet/PathMerge/BridgePath2/data
new file mode 100644
index 0000000..43d9cfc
--- /dev/null
+++ b/genomix/genomix-pregelix/data/TestSet/PathMerge/BridgePath2/data
@@ -0,0 +1,12 @@
+GAA	{[{AAC:[1]}]	[]	[]	[{AGA:[1]}]	{5':[], ~5':[]}	1.0x}
+AGA	{[{GAA:[1]}]	[]	[{CTA:[1]}]	[]	{5':[], ~5':[]}	1.0x}
+ATA	{[]	[{CTA:[1,2]}]	[]	[{AAT:[1,2]}]	{5':[], ~5':[]}	2.0x}
+CTA	{[]	[{ATA:[1,2]}]	[{AGC:[2]}, {AGA:[1]}]	[]	{5':[], ~5':[]}	2.0x}
+AAC	{[{ACT:[1]}]	[]	[]	[{GAA:[1]}]	{5':[], ~5':[]}	1.0x}
+CCC	{[]	[{AGG:[2]}]	[]	[{GCC:[2]}]	{5':[], ~5':[]}	1.0x}
+GCC	{[{CCC:[2]}]	[]	[]	[{AGC:[2]}]	{5':[], ~5':[]}	1.0x}
+AGC	{[{GCC:[2]}]	[]	[{CTA:[2]}]	[]	{5':[], ~5':[]}	1.0x}
+AAG	{[{AGG:[2]}]	[{ACT:[1]}]	[]	[]	{5':[], ~5':[]}	2.0x}
+AGG	{[]	[{CCC:[2]}]	[]	[{AAG:[2]}]	{5':[], ~5':[]}	1.0x}
+AAT	{[{ATA:[1,2]}]	[]	[]	[]	{5':[(2-0_0),(1-0_0)], ~5':[]}	2.0x}
+ACT	{[]	[{AAG:[1]}]	[]	[{AAC:[1]}]	{5':[], ~5':[]}	1.0x}
diff --git a/genomix/genomix-pregelix/data/TestSet/PathMerge/BridgePath2/graphviz/result.ps b/genomix/genomix-pregelix/data/TestSet/PathMerge/BridgePath2/graphviz/result.ps
new file mode 100644
index 0000000..1c100e3
--- /dev/null
+++ b/genomix/genomix-pregelix/data/TestSet/PathMerge/BridgePath2/graphviz/result.ps
@@ -0,0 +1,1229 @@
+%!PS-Adobe-3.0
+%%Creator: graphviz version 2.26.3 (20100126.1600)
+%%Title: G
+%%Pages: (atend)
+%%BoundingBox: (atend)
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+        dup dup findfont dup length dict begin
+        { 1 index /FID ne { def }{ pop pop } ifelse
+        } forall
+        /Encoding EncodingVector def
+        currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+       dup 1 exch div /InvScaleFactor exch def
+       scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color 
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage {	% i j npages
+	/npages exch def
+	/j exch def
+	/i exch def
+	/str 10 string def
+	npages 1 gt {
+		gsave
+			coordfont setfont
+			0 0 moveto
+			(\() show i str cvs show (,) show j str cvs show (\)) show
+		grestore
+	} if
+} bind def
+
+/set_font {
+	findfont exch
+	scalefont setfont
+} def
+
+% draw text fitted to its expected width
+/alignedtext {			% width text
+	/text exch def
+	/width exch def
+	gsave
+		width 0 gt {
+			[] 0 setdash
+			text stringwidth pop width exch sub text length div 0 text ashow
+		} if
+	grestore
+} def
+
+/boxprim {				% xcorner ycorner xsize ysize
+		4 2 roll
+		moveto
+		2 copy
+		exch 0 rlineto
+		0 exch rlineto
+		pop neg 0 rlineto
+		closepath
+} bind def
+
+/ellipse_path {
+	/ry exch def
+	/rx exch def
+	/y exch def
+	/x exch def
+	matrix currentmatrix
+	newpath
+	x y translate
+	rx ry scale
+	0 0 1 0 360 arc
+	setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+	[	% layer color sequence - darkest to lightest
+		[0 0 0]
+		[.2 .8 .8]
+		[.4 .8 .8]
+		[.6 .8 .8]
+		[.8 .8 .8]
+	]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+	layercolorseq curlayer 1 sub layerlen mod get
+	aload pop sethsbcolor
+	/nodecolor {nopcolor} def
+	/edgecolor {nopcolor} def
+	/graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+	/myupper exch def
+	/mylower exch def
+	curlayer mylower lt
+	curlayer myupper gt
+	or
+	{invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+    userdict (<<) cvn ([) cvn load put
+    userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+setupLatin1
+%%Page: 1 1
+%%PageBoundingBox: 36 36 1532 287
+%%PageOrientation: Portrait
+0 0 1 beginpage
+gsave
+36 36 1496 251 boxprim clip newpath
+1 1 set_scale 0 rotate 40 41 translate
+% GAA
+gsave
+1 setlinewidth
+0 0 0 nodecolor
+newpath 0 9 moveto
+0 113 lineto
+56 113 lineto
+56 9 lineto
+closepath stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+12 96.4 moveto 32 (GAA) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 0 87 moveto
+56 87 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+14 70.4 moveto 28 (5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 0 61 moveto
+56 61 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+8 44.4 moveto 40 (~5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 0 35 moveto
+56 35 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+16.5 18.4 moveto 23 (1.0) alignedtext
+grestore
+% AAC
+gsave
+1 setlinewidth
+0 0 0 nodecolor
+newpath 140 72 moveto
+140 176 lineto
+196 176 lineto
+196 72 lineto
+closepath stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+152.5 159.4 moveto 31 (AAC) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 140 150 moveto
+196 150 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+154 133.4 moveto 28 (5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 140 124 moveto
+196 124 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+148 107.4 moveto 40 (~5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 140 98 moveto
+196 98 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+156.5 81.4 moveto 23 (1.0) alignedtext
+grestore
+% GAA->AAC
+gsave
+1 setlinewidth
+0 0 0 edgecolor
+newpath 56 88.12 moveto
+61.65 92.58 67.77 96.78 74 100 curveto
+91.26 108.91 112.06 114.67 129.69 118.3 curveto
+stroke
+0 0 0 edgecolor
+newpath 129.18 121.76 moveto
+139.66 120.2 lineto
+130.49 114.89 lineto
+closepath fill
+1 setlinewidth
+solid
+0 0 0 edgecolor
+newpath 129.18 121.76 moveto
+139.66 120.2 lineto
+130.49 114.89 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+75.5 121.4 moveto 45 (FF: [1]) alignedtext
+grestore
+% AGA
+gsave
+1 setlinewidth
+0 0 0 nodecolor
+newpath 1268 0 moveto
+1268 104 lineto
+1324 104 lineto
+1324 0 lineto
+closepath stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+1280.5 87.4 moveto 31 (AGA) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 1268 78 moveto
+1324 78 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+1282 61.4 moveto 28 (5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 1268 52 moveto
+1324 52 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+1276 35.4 moveto 40 (~5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 1268 26 moveto
+1324 26 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+1284.5 9.4 moveto 23 (1.0) alignedtext
+grestore
+% GAA->AGA
+gsave
+1 setlinewidth
+0 1 1 edgecolor
+newpath 56.03 55.57 moveto
+84.21 50.6 128.95 44 168 44 curveto
+168 44 168 44 1144 44 curveto
+1182.65 44 1226.75 46.61 1257.46 48.85 curveto
+stroke
+0 1 1 edgecolor
+newpath 1257.49 52.36 moveto
+1267.73 49.62 lineto
+1258.02 45.38 lineto
+closepath fill
+1 setlinewidth
+solid
+0 1 1 edgecolor
+newpath 1257.49 52.36 moveto
+1267.73 49.62 lineto
+1258.02 45.38 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+632 49.4 moveto 48 (RR: [1]) alignedtext
+grestore
+% AAC->GAA
+gsave
+1 setlinewidth
+0 1 1 edgecolor
+newpath 139.99 90.84 moveto
+134.48 85.9 128.4 81.35 122 78 curveto
+104.93 69.06 83.99 64.74 66.21 62.68 curveto
+stroke
+0 1 1 edgecolor
+newpath 66.45 59.18 moveto
+56.16 61.71 lineto
+65.78 66.15 lineto
+closepath fill
+1 setlinewidth
+solid
+0 1 1 edgecolor
+newpath 66.45 59.18 moveto
+56.16 61.71 lineto
+65.78 66.15 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+74 83.4 moveto 48 (RR: [1]) alignedtext
+grestore
+% ACT
+gsave
+1 setlinewidth
+0 0 0 nodecolor
+newpath 280 72 moveto
+280 176 lineto
+336 176 lineto
+336 72 lineto
+closepath stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+293.5 159.4 moveto 29 (ACT) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 280 150 moveto
+336 150 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+294 133.4 moveto 28 (5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 280 124 moveto
+336 124 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+288 107.4 moveto 40 (~5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 280 98 moveto
+336 98 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+296.5 81.4 moveto 23 (1.0) alignedtext
+grestore
+% AAC->ACT
+gsave
+1 setlinewidth
+0 0 0 edgecolor
+newpath 196.33 124 moveto
+217.39 124 246.37 124 269.53 124 curveto
+stroke
+0 0 0 edgecolor
+newpath 269.71 127.5 moveto
+279.71 124 lineto
+269.71 120.5 lineto
+closepath fill
+1 setlinewidth
+solid
+0 0 0 edgecolor
+newpath 269.71 127.5 moveto
+279.71 124 lineto
+269.71 120.5 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+215.5 129.4 moveto 45 (FF: [1]) alignedtext
+grestore
+% AGA->GAA
+gsave
+1 setlinewidth
+0 0 0 edgecolor
+newpath 1267.74 37.03 moveto
+1237.85 22.62 1188.92 3 1144 3 curveto
+168 3 168 3 168 3 curveto
+130.89 3 92.17 20.61 64.88 36.42 curveto
+stroke
+0 0 0 edgecolor
+newpath 62.87 33.55 moveto
+56.09 41.69 lineto
+66.46 39.55 lineto
+closepath fill
+1 setlinewidth
+solid
+0 0 0 edgecolor
+newpath 62.87 33.55 moveto
+56.09 41.69 lineto
+66.46 39.55 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+633.5 8.4 moveto 45 (FF: [1]) alignedtext
+grestore
+% CTA
+gsave
+1 setlinewidth
+0 0 0 nodecolor
+newpath 1116 73 moveto
+1116 177 lineto
+1172 177 lineto
+1172 73 lineto
+closepath stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+1130 160.4 moveto 28 (CTA) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 1116 151 moveto
+1172 151 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+1130 134.4 moveto 28 (5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 1116 125 moveto
+1172 125 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+1124 108.4 moveto 40 (~5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 1116 99 moveto
+1172 99 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+1132.5 82.4 moveto 23 (2.0) alignedtext
+grestore
+% AGA->CTA
+gsave
+1 setlinewidth
+0.33333 1 1 edgecolor
+newpath 1267.87 54.62 moveto
+1245.55 57.68 1214.2 64.2 1190 78 curveto
+1186.53 79.98 1183.15 82.3 1179.89 84.82 curveto
+stroke
+0.33333 1 1 edgecolor
+newpath 1177.45 82.31 moveto
+1172.1 91.45 lineto
+1181.99 87.64 lineto
+closepath fill
+1 setlinewidth
+solid
+0.33333 1 1 edgecolor
+newpath 1177.45 82.31 moveto
+1172.1 91.45 lineto
+1181.99 87.64 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+1197 83.4 moveto 46 (RF: [1]) alignedtext
+grestore
+% CTA->AGA
+gsave
+1 setlinewidth
+0.33333 1 1 edgecolor
+newpath 1172.19 118.94 moveto
+1198.87 112.91 1236.76 103.5 1250 96 curveto
+1253.42 94.06 1256.77 91.82 1260.02 89.39 curveto
+stroke
+0.33333 1 1 edgecolor
+newpath 1262.29 92.05 moveto
+1267.83 83.02 lineto
+1257.87 86.62 lineto
+closepath fill
+1 setlinewidth
+solid
+0.33333 1 1 edgecolor
+newpath 1262.29 92.05 moveto
+1267.83 83.02 lineto
+1257.87 86.62 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+1197 119.4 moveto 46 (RF: [1]) alignedtext
+grestore
+% ATA
+gsave
+1 setlinewidth
+0 0 0 nodecolor
+newpath 1268 139 moveto
+1268 243 lineto
+1324 243 lineto
+1324 139 lineto
+closepath stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+1282 226.4 moveto 28 (ATA) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 1268 217 moveto
+1324 217 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+1282 200.4 moveto 28 (5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 1268 191 moveto
+1324 191 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+1276 174.4 moveto 40 (~5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 1268 165 moveto
+1324 165 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+1284.5 148.4 moveto 23 (2.0) alignedtext
+grestore
+% CTA->ATA
+gsave
+1 setlinewidth
+0.66667 1 1 edgecolor
+newpath 1172.26 164.59 moveto
+1177.59 169.83 1183.55 174.57 1190 178 curveto
+1210.58 188.95 1236.52 192.28 1257.59 192.83 curveto
+stroke
+0.66667 1 1 edgecolor
+newpath 1257.78 196.34 moveto
+1267.8 192.9 lineto
+1257.82 189.34 lineto
+closepath fill
+1 setlinewidth
+solid
+0.66667 1 1 edgecolor
+newpath 1257.78 196.34 moveto
+1267.8 192.9 lineto
+1257.82 189.34 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+1190 197.4 moveto 60 (FR: [1,2]) alignedtext
+grestore
+% AGC
+gsave
+1 setlinewidth
+0 0 0 nodecolor
+newpath 978 76 moveto
+978 180 lineto
+1034 180 lineto
+1034 76 lineto
+closepath stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+990.5 163.4 moveto 31 (AGC) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 978 154 moveto
+1034 154 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+992 137.4 moveto 28 (5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 978 128 moveto
+1034 128 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+986 111.4 moveto 40 (~5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 978 102 moveto
+1034 102 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+994.5 85.4 moveto 23 (1.0) alignedtext
+grestore
+% CTA->AGC
+gsave
+1 setlinewidth
+0.33333 1 1 edgecolor
+newpath 1115.88 97.64 moveto
+1110.34 93.69 1104.28 90.21 1098 88 curveto
+1078.72 81.21 1071.15 80.84 1052 88 curveto
+1048.73 89.22 1045.54 90.8 1042.46 92.61 curveto
+stroke
+0.33333 1 1 edgecolor
+newpath 1040.43 89.75 moveto
+1034.11 98.25 lineto
+1044.35 95.55 lineto
+closepath fill
+1 setlinewidth
+solid
+0.33333 1 1 edgecolor
+newpath 1040.43 89.75 moveto
+1034.11 98.25 lineto
+1044.35 95.55 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+1052 93.4 moveto 46 (RF: [2]) alignedtext
+grestore
+% ATA->CTA
+gsave
+1 setlinewidth
+0.66667 1 1 edgecolor
+newpath 1267.53 170.07 moveto
+1261.88 166.42 1255.88 162.88 1250 160 curveto
+1228.32 149.37 1202.63 140.79 1181.97 134.79 curveto
+stroke
+0.66667 1 1 edgecolor
+newpath 1182.85 131.4 moveto
+1172.27 132.06 lineto
+1180.95 138.14 lineto
+closepath fill
+1 setlinewidth
+solid
+0.66667 1 1 edgecolor
+newpath 1182.85 131.4 moveto
+1172.27 132.06 lineto
+1180.95 138.14 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+1190 165.4 moveto 60 (FR: [1,2]) alignedtext
+grestore
+% AAT
+gsave
+0 0 0.75294 nodecolor
+newpath 1422 138 moveto
+1422 242 lineto
+1488 242 lineto
+1488 138 lineto
+closepath fill
+1 setlinewidth
+filled
+0 0 0 nodecolor
+newpath 1422 138 moveto
+1422 242 lineto
+1488 242 lineto
+1488 138 lineto
+closepath stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+1440.5 225.4 moveto 29 (AAT) alignedtext
+1 setlinewidth
+filled
+0 0 0 nodecolor
+newpath 1422 216 moveto
+1488 216 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+1430 199.4 moveto 50 (5':[2,1]) alignedtext
+1 setlinewidth
+filled
+0 0 0 nodecolor
+newpath 1422 190 moveto
+1488 190 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+1435 173.4 moveto 40 (~5':[]) alignedtext
+1 setlinewidth
+filled
+0 0 0 nodecolor
+newpath 1422 164 moveto
+1488 164 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+1443.5 147.4 moveto 23 (2.0) alignedtext
+grestore
+% ATA->AAT
+gsave
+1 setlinewidth
+0 1 1 edgecolor
+newpath 1324.06 190.82 moveto
+1348.33 190.67 1383.81 190.45 1411.71 190.27 curveto
+stroke
+0 1 1 edgecolor
+newpath 1412.02 193.77 moveto
+1422 190.21 lineto
+1411.98 186.77 lineto
+closepath fill
+1 setlinewidth
+solid
+0 1 1 edgecolor
+newpath 1412.02 193.77 moveto
+1422 190.21 lineto
+1411.98 186.77 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+1342.5 195.4 moveto 61 (RR: [1,2]) alignedtext
+grestore
+% AAT->ATA
+gsave
+1 setlinewidth
+0 0 0 edgecolor
+newpath 1421.89 173.44 moveto
+1416.06 171.18 1409.95 169.23 1404 168 curveto
+1377.01 162.43 1368.82 161.67 1342 168 curveto
+1339.32 168.63 1336.62 169.45 1333.95 170.39 curveto
+stroke
+0 0 0 edgecolor
+newpath 1332.37 167.25 moveto
+1324.43 174.26 lineto
+1335.01 173.73 lineto
+closepath fill
+1 setlinewidth
+solid
+0 0 0 edgecolor
+newpath 1332.37 167.25 moveto
+1324.43 174.26 lineto
+1335.01 173.73 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+1344 173.4 moveto 58 (FF: [1,2]) alignedtext
+grestore
+% AGC->CTA
+gsave
+1 setlinewidth
+0.33333 1 1 edgecolor
+newpath 1034.26 127.39 moveto
+1054.82 126.94 1082.89 126.33 1105.5 125.84 curveto
+stroke
+0.33333 1 1 edgecolor
+newpath 1105.86 129.33 moveto
+1115.78 125.61 lineto
+1105.7 122.33 lineto
+closepath fill
+1 setlinewidth
+solid
+0.33333 1 1 edgecolor
+newpath 1105.86 129.33 moveto
+1115.78 125.61 lineto
+1105.7 122.33 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+1052 131.4 moveto 46 (RF: [2]) alignedtext
+grestore
+% GCC
+gsave
+1 setlinewidth
+0 0 0 nodecolor
+newpath 838 81 moveto
+838 185 lineto
+894 185 lineto
+894 81 lineto
+closepath stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+850.5 168.4 moveto 31 (GCC) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 838 159 moveto
+894 159 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+852 142.4 moveto 28 (5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 838 133 moveto
+894 133 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+846 116.4 moveto 40 (~5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 838 107 moveto
+894 107 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+854.5 90.4 moveto 23 (1.0) alignedtext
+grestore
+% AGC->GCC
+gsave
+1 setlinewidth
+0 0 0 edgecolor
+newpath 977.95 112.92 moveto
+972.17 110.47 966 108.31 960 107 curveto
+939.15 102.47 932.63 101.57 912 107 curveto
+909.17 107.74 906.34 108.71 903.54 109.82 curveto
+stroke
+0 0 0 edgecolor
+newpath 901.85 106.74 moveto
+894.23 114.1 lineto
+904.77 113.1 lineto
+closepath fill
+1 setlinewidth
+solid
+0 0 0 edgecolor
+newpath 901.85 106.74 moveto
+894.23 114.1 lineto
+904.77 113.1 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+913.5 112.4 moveto 45 (FF: [2]) alignedtext
+grestore
+% ACT->AAC
+gsave
+1 setlinewidth
+0 1 1 edgecolor
+newpath 279.51 107.99 moveto
+273.87 105.51 267.87 103.33 262 102 curveto
+241.2 97.28 234.8 97.28 214 102 curveto
+211.34 102.6 208.65 103.38 205.99 104.28 curveto
+stroke
+0 1 1 edgecolor
+newpath 204.53 101.09 moveto
+196.49 107.99 lineto
+207.08 107.61 lineto
+closepath fill
+1 setlinewidth
+solid
+0 1 1 edgecolor
+newpath 204.53 101.09 moveto
+196.49 107.99 lineto
+207.08 107.61 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+214 107.4 moveto 48 (RR: [1]) alignedtext
+grestore
+% AAG
+gsave
+1 setlinewidth
+0 0 0 nodecolor
+newpath 418 83 moveto
+418 187 lineto
+474 187 lineto
+474 83 lineto
+closepath stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+430 170.4 moveto 32 (AAG) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 418 161 moveto
+474 161 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+432 144.4 moveto 28 (5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 418 135 moveto
+474 135 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+426 118.4 moveto 40 (~5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 418 109 moveto
+474 109 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+434.5 92.4 moveto 23 (2.0) alignedtext
+grestore
+% ACT->AAG
+gsave
+1 setlinewidth
+0.66667 1 1 edgecolor
+newpath 336.1 130.29 moveto
+341.99 131.38 348.17 132.37 354 133 curveto
+371.46 134.88 390.89 135.52 407.37 135.63 curveto
+stroke
+0.66667 1 1 edgecolor
+newpath 407.73 139.13 moveto
+417.73 135.63 lineto
+407.74 132.13 lineto
+closepath fill
+1 setlinewidth
+solid
+0.66667 1 1 edgecolor
+newpath 407.73 139.13 moveto
+417.73 135.63 lineto
+407.74 132.13 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+354 140.4 moveto 46 (FR: [1]) alignedtext
+grestore
+% CCC
+gsave
+1 setlinewidth
+0 0 0 nodecolor
+newpath 698 91 moveto
+698 195 lineto
+754 195 lineto
+754 91 lineto
+closepath stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+711 178.4 moveto 30 (CCC) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 698 169 moveto
+754 169 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+712 152.4 moveto 28 (5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 698 143 moveto
+754 143 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+706 126.4 moveto 40 (~5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 698 117 moveto
+754 117 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+714.5 100.4 moveto 23 (1.0) alignedtext
+grestore
+% AGG
+gsave
+1 setlinewidth
+0 0 0 nodecolor
+newpath 558 73 moveto
+558 177 lineto
+614 177 lineto
+614 73 lineto
+closepath stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+569.5 160.4 moveto 33 (AGG) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 558 151 moveto
+614 151 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+572 134.4 moveto 28 (5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 558 125 moveto
+614 125 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+566 108.4 moveto 40 (~5':[]) alignedtext
+1 setlinewidth
+0 0 0 nodecolor
+newpath 558 99 moveto
+614 99 lineto
+stroke
+0 0 0 nodecolor
+14 /Times-Roman set_font
+574.5 82.4 moveto 23 (1.0) alignedtext
+grestore
+% CCC->AGG
+gsave
+1 setlinewidth
+0.66667 1 1 edgecolor
+newpath 697.97 114.91 moveto
+692.42 110.85 686.34 107.28 680 105 curveto
+659.93 97.78 652.89 100.66 632 105 curveto
+629.2 105.58 626.37 106.34 623.55 107.23 curveto
+stroke
+0.66667 1 1 edgecolor
+newpath 622.33 103.95 moveto
+614.11 110.63 lineto
+624.71 110.53 lineto
+closepath fill
+1 setlinewidth
+solid
+0.66667 1 1 edgecolor
+newpath 622.33 103.95 moveto
+614.11 110.63 lineto
+624.71 110.53 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+633 110.4 moveto 46 (FR: [2]) alignedtext
+grestore
+% CCC->GCC
+gsave
+1 setlinewidth
+0 1 1 edgecolor
+newpath 754.33 140.98 moveto
+775.39 139.47 804.37 137.4 827.53 135.75 curveto
+stroke
+0 1 1 edgecolor
+newpath 827.99 139.22 moveto
+837.71 135.02 lineto
+827.49 132.24 lineto
+closepath fill
+1 setlinewidth
+solid
+0 1 1 edgecolor
+newpath 827.99 139.22 moveto
+837.71 135.02 lineto
+827.49 132.24 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+772 144.4 moveto 48 (RR: [2]) alignedtext
+grestore
+% AGG->CCC
+gsave
+1 setlinewidth
+0.66667 1 1 edgecolor
+newpath 614.33 128.64 moveto
+635.39 131.35 664.37 135.08 687.53 138.05 curveto
+stroke
+0.66667 1 1 edgecolor
+newpath 687.35 141.56 moveto
+697.71 139.36 lineto
+688.24 134.62 lineto
+closepath fill
+1 setlinewidth
+solid
+0.66667 1 1 edgecolor
+newpath 687.35 141.56 moveto
+697.71 139.36 lineto
+688.24 134.62 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+633 141.4 moveto 46 (FR: [2]) alignedtext
+grestore
+% AGG->AAG
+gsave
+1 setlinewidth
+0 1 1 edgecolor
+newpath 557.83 111.35 moveto
+552.06 109.13 545.93 107.18 540 106 curveto
+519.07 101.85 512.5 100.08 492 106 curveto
+489.01 106.86 486.03 107.98 483.11 109.28 curveto
+stroke
+0 1 1 edgecolor
+newpath 481.32 106.27 moveto
+474.01 113.93 lineto
+484.51 112.5 lineto
+closepath fill
+1 setlinewidth
+solid
+0 1 1 edgecolor
+newpath 481.32 106.27 moveto
+474.01 113.93 lineto
+484.51 112.5 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+492 111.4 moveto 48 (RR: [2]) alignedtext
+grestore
+% GCC->AGC
+gsave
+1 setlinewidth
+0 1 1 edgecolor
+newpath 894.33 131.99 moveto
+915.39 131.24 944.37 130.2 967.53 129.37 curveto
+stroke
+0 1 1 edgecolor
+newpath 967.84 132.87 moveto
+977.71 129.01 lineto
+967.59 125.87 lineto
+closepath fill
+1 setlinewidth
+solid
+0 1 1 edgecolor
+newpath 967.84 132.87 moveto
+977.71 129.01 lineto
+967.59 125.87 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+912 136.4 moveto 48 (RR: [2]) alignedtext
+grestore
+% GCC->CCC
+gsave
+1 setlinewidth
+0 0 0 edgecolor
+newpath 837.83 119.35 moveto
+832.06 117.13 825.93 115.18 820 114 curveto
+799.07 109.85 792.5 108.08 772 114 curveto
+769.01 114.86 766.03 115.98 763.11 117.28 curveto
+stroke
+0 0 0 edgecolor
+newpath 761.32 114.27 moveto
+754.01 121.93 lineto
+764.51 120.5 lineto
+closepath fill
+1 setlinewidth
+solid
+0 0 0 edgecolor
+newpath 761.32 114.27 moveto
+754.01 121.93 lineto
+764.51 120.5 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+773.5 119.4 moveto 45 (FF: [2]) alignedtext
+grestore
+% AAG->ACT
+gsave
+1 setlinewidth
+0.66667 1 1 edgecolor
+newpath 417.89 120.63 moveto
+412.11 118.3 405.97 116.24 400 115 curveto
+382.43 111.35 362.67 112.6 345.97 115.17 curveto
+stroke
+0.66667 1 1 edgecolor
+newpath 345.26 111.74 moveto
+336.01 116.91 lineto
+346.47 118.64 lineto
+closepath fill
+1 setlinewidth
+solid
+0.66667 1 1 edgecolor
+newpath 345.26 111.74 moveto
+336.01 116.91 lineto
+346.47 118.64 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+354 120.4 moveto 46 (FR: [1]) alignedtext
+grestore
+% AAG->AGG
+gsave
+1 setlinewidth
+0 0 0 edgecolor
+newpath 474.33 132.98 moveto
+495.39 131.47 524.37 129.4 547.53 127.75 curveto
+stroke
+0 0 0 edgecolor
+newpath 547.99 131.22 moveto
+557.71 127.02 lineto
+547.49 124.24 lineto
+closepath fill
+1 setlinewidth
+solid
+0 0 0 edgecolor
+newpath 547.99 131.22 moveto
+557.71 127.02 lineto
+547.49 124.24 lineto
+closepath stroke
+0 0 0 edgecolor
+14 /Times-Roman set_font
+493.5 136.4 moveto 45 (FF: [2]) alignedtext
+grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+%%BoundingBox: 36 36 1532 287
+end
+restore
+%%EOF
diff --git a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/BasicGraphCleanVertex.java b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/BasicGraphCleanVertex.java
index 2377e2a..c2d29d2 100644
--- a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/BasicGraphCleanVertex.java
+++ b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/BasicGraphCleanVertex.java
@@ -14,6 +14,7 @@
 import edu.uci.ics.genomix.pregelix.util.VertexUtil;
 import edu.uci.ics.genomix.type.VKmerBytesWritable;
 import edu.uci.ics.genomix.type.VKmerListWritable;
+import edu.uci.ics.genomix.type.NodeWritable.DirectionFlag;
 
 public abstract class BasicGraphCleanVertex<M extends MessageWritable> extends
         Vertex<VKmerBytesWritable, VertexValueWritable, NullWritable, M> {
@@ -27,6 +28,8 @@
     protected VKmerBytesWritable destVertexId = null;
     protected Iterator<VKmerBytesWritable> kmerIterator;
     protected VKmerListWritable kmerList = null;
+    protected VKmerBytesWritable curKmer = null; //for detect tandemRepeat
+    protected byte repeatDir; //for detect tandemRepeat
     protected VKmerBytesWritable tmpKmer = null;
     protected byte headFlag;
     protected byte outFlag;
@@ -268,7 +271,7 @@
     /**
      * head send message to all previous nodes
      */
-    public void sendSettledMsgToAllPreviousNodes() {
+    public void sendSettledMsgToAllPrevNodes() {
         kmerIterator = getVertexValue().getRFList().getKeys(); // RFList
         while(kmerIterator.hasNext()){
             outFlag &= MessageFlag.DIR_CLEAR;
@@ -314,7 +317,7 @@
     }
     
     public void sendSettledMsgToAllNeighborNodes() {
-        sendSettledMsgToAllPreviousNodes();
+        sendSettledMsgToAllPrevNodes();
         sendSettledMsgToAllNextNodes();
     }
     
@@ -322,40 +325,54 @@
      * start sending message
      */
     public void startSendMsg() {
-        if (VertexUtil.isHeadVertexWithManyOutgoing(getVertexValue())) {
-            outFlag = 0;
-            outFlag |= MessageFlag.IS_HEAD;
-            outFlag |= MessageFlag.HEAD_SHOULD_MERGEWITHNEXT;
-            outgoingMsg.setFlag(outFlag);
-            sendMsgToAllNextNodes();
-            voteToHalt();
-        }
-        if (VertexUtil.isRearVertexWithManyIncoming(getVertexValue())) {
+//        if(isTandemRepeat())
+        
+        if (VertexUtil.isVertexWithOnlyOneIncoming(getVertexValue())){
             outFlag = 0;
             outFlag |= MessageFlag.IS_HEAD;
             outFlag |= MessageFlag.HEAD_SHOULD_MERGEWITHPREV;
-            outgoingMsg.setFlag(outFlag);
-            sendMsgToAllPreviousNodes();
-            voteToHalt();
+            getVertexValue().setState(outFlag);
+            activate();
         }
-        if (VertexUtil.isHeadVertexWithOnlyOneOutgoing(getVertexValue())){
+        if (VertexUtil.isVertexWithOnlyOneOutgoing(getVertexValue())){
             outFlag = 0;
             outFlag |= MessageFlag.IS_HEAD;
             outFlag |= MessageFlag.HEAD_SHOULD_MERGEWITHNEXT;
-            outgoingMsg.setFlag(outFlag);
-            sendMsg(getVertexId(), outgoingMsg); //send to itself
-            voteToHalt();
+            getVertexValue().setState(outFlag);
+            activate();
         }
-        if (VertexUtil.isRearVertexWithOnlyOneIncoming(getVertexValue())){
+        if (VertexUtil.isVertexWithManyIncoming(getVertexValue())) {
             outFlag = 0;
             outFlag |= MessageFlag.IS_HEAD;
-            outFlag |= MessageFlag.HEAD_SHOULD_MERGEWITHPREV;
-            outgoingMsg.setFlag(outFlag);
-            sendMsg(getVertexId(), outgoingMsg); //send to itself
+            sendSettledMsgToAllPrevNodes();
+        }
+        if (VertexUtil.isVertexWithManyOutgoing(getVertexValue())) {
+            outFlag = 0;
+            outFlag |= MessageFlag.IS_HEAD;
+            sendSettledMsgToAllNextNodes();
+        }
+        if(!VertexUtil.isActiveVertex(getVertexValue())){
+            getVertexValue().setState(MessageFlag.IS_HALT);
             voteToHalt();
         }
     }
 
+    public void setHeadMergeDir(){
+        byte state = MessageFlag.IS_HEAD;
+        byte meToNeighborDir = (byte) (incomingMsg.getFlag() & MessageFlag.DIR_MASK);
+        byte neighborToMeDir = mirrorDirection(meToNeighborDir);
+        switch(neighborToMeDir){
+            case MessageFlag.DIR_FF:
+            case MessageFlag.DIR_FR:
+                state |= MessageFlag.HEAD_SHOULD_MERGEWITHPREV;
+                break;
+            case MessageFlag.DIR_RF:
+            case MessageFlag.DIR_RR:
+                state |= MessageFlag.HEAD_SHOULD_MERGEWITHNEXT;
+                break;
+        }
+        getVertexValue().setState(state);
+    }
     /**
      * initiate head, rear and path node
      */
@@ -363,8 +380,8 @@
         while (msgIterator.hasNext()) {
             incomingMsg = msgIterator.next();
             if(getHeadFlag() != MessageFlag.IS_HEAD){
-                getVertexValue().setState(incomingMsg.getFlag());
-                this.activate();
+                setHeadMergeDir();
+                activate();
             } else{ /** already set up **/
                 /** if headMergeDir are not the same **/
                 getVertexValue().setState(MessageFlag.IS_HALT);
@@ -591,8 +608,36 @@
         }
     }
     
-    @Override
-    public void compute(Iterator<M> msgIterator) {
-        
+    /**
+     * check if it is a tandem repeat
+     */
+    public boolean isTandemRepeat(){
+        for(byte d : DirectionFlag.values){
+            Iterator<VKmerBytesWritable> it = getVertexValue().getEdgeList(d).getKeys();
+            while(it.hasNext()){
+                curKmer.setAsCopy(it.next());
+                if(curKmer.equals(getVertexId())){
+                    repeatDir = d;
+                    return true;
+                }
+            }
+        }
+        return false;
     }
+    
+    public byte flipDir(byte dir){
+        switch(dir){
+            case DirectionFlag.DIR_FF:
+                return DirectionFlag.DIR_RF;
+            case DirectionFlag.DIR_FR:
+                return DirectionFlag.DIR_RR;
+            case DirectionFlag.DIR_RF:
+                return DirectionFlag.DIR_FF;
+            case DirectionFlag.DIR_RR:
+                return DirectionFlag.DIR_FR;
+            default:
+                throw new RuntimeException("Unrecognized direction in flipDirection: " + dir);
+        }
+    }
+    
 }
\ No newline at end of file
diff --git a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/bridgeremove/BridgeRemoveVertex.java b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/bridgeremove/BridgeRemoveVertex.java
index 2521104..37547c5 100644
--- a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/bridgeremove/BridgeRemoveVertex.java
+++ b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/bridgeremove/BridgeRemoveVertex.java
@@ -79,7 +79,7 @@
                 sendSettledMsgToAllNextNodes();
             }
             else if(VertexUtil.isDownBridgeVertex(getVertexValue())){
-                sendSettledMsgToAllPreviousNodes();
+                sendSettledMsgToAllPrevNodes();
             }
         }
         else if (getSuperstep() == 2){
diff --git a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/scaffolding/BFSTraverseVertex.java b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/scaffolding/BFSTraverseVertex.java
index e7cd4ac..0f82bda 100644
--- a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/scaffolding/BFSTraverseVertex.java
+++ b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/scaffolding/BFSTraverseVertex.java
@@ -75,7 +75,7 @@
         outgoingMsg.setPathList(kmerList);
         outgoingMsg.setReadId(incomingMsg.getReadId()); //only one readId
         if(incomingMsg.isSrcFlip())
-            sendSettledMsgToAllPreviousNodes();
+            sendSettledMsgToAllPrevNodes();
         else
             sendSettledMsgToAllNextNodes();
     }
@@ -97,7 +97,7 @@
         switch(neighborToMeDir){
             case MessageFlag.DIR_FF:
             case MessageFlag.DIR_FR:
-                sendSettledMsgToAllPreviousNodes();
+                sendSettledMsgToAllPrevNodes();
                 break;
             case MessageFlag.DIR_RF:
             case MessageFlag.DIR_RR:
diff --git a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/unrolltandemrepeat/UnrollTandemRepeat.java b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/unrolltandemrepeat/UnrollTandemRepeat.java
index 01e656b..c2569d2 100644
--- a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/unrolltandemrepeat/UnrollTandemRepeat.java
+++ b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/operator/unrolltandemrepeat/UnrollTandemRepeat.java
@@ -2,33 +2,25 @@
 
 import java.util.Iterator;
 
-import org.apache.hadoop.io.NullWritable;
-
 import edu.uci.ics.genomix.pregelix.client.Client;
 import edu.uci.ics.genomix.pregelix.format.GraphCleanOutputFormat;
 import edu.uci.ics.genomix.pregelix.format.InitialGraphCleanInputFormat;
 import edu.uci.ics.genomix.pregelix.io.MessageWritable;
 import edu.uci.ics.genomix.pregelix.io.VertexValueWritable;
-import edu.uci.ics.genomix.pregelix.type.MessageFlag;
+import edu.uci.ics.genomix.pregelix.operator.BasicGraphCleanVertex;
 import edu.uci.ics.genomix.pregelix.util.VertexUtil;
 import edu.uci.ics.genomix.type.EdgeWritable;
 import edu.uci.ics.genomix.type.VKmerBytesWritable;
 import edu.uci.ics.genomix.type.NodeWritable.DirectionFlag;
-import edu.uci.ics.pregelix.api.graph.Vertex;
 import edu.uci.ics.pregelix.api.job.PregelixJob;
 
 public class UnrollTandemRepeat extends
-        Vertex<VKmerBytesWritable, VertexValueWritable, NullWritable, MessageWritable>{
+    BasicGraphCleanVertex<MessageWritable>{
     public static final String KMER_SIZE = "BasicGraphCleanVertex.kmerSize";
     public static int kmerSize = -1;
     
-    private VKmerBytesWritable curKmer = new VKmerBytesWritable();
-    private byte repeatDir = 0;
-    
     private VertexValueWritable tmpValue = new VertexValueWritable();
     private EdgeWritable tmpEdge = new EdgeWritable();
-    private MessageWritable incomingMsg = new MessageWritable();
-    private MessageWritable outgoingMsg = new MessageWritable();
     
     /**
      * initiate kmerSize, length
@@ -40,53 +32,6 @@
     }
     
     /**
-     * check if it is a tandem repeat
-     */
-    public boolean isTandemRepeat(){
-        for(byte d : DirectionFlag.values){
-            Iterator<VKmerBytesWritable> it = getVertexValue().getEdgeList(d).getKeys();
-            while(it.hasNext()){
-                curKmer.setAsCopy(it.next());
-                if(curKmer.equals(getVertexId())){
-                    repeatDir = d;
-                    return true;
-                }
-            }
-        }
-        return false;
-    }
-    
-    public byte mirrorDirection(byte dir) {
-        switch (dir) {
-            case MessageFlag.DIR_FF:
-                return MessageFlag.DIR_RR;
-            case MessageFlag.DIR_FR:
-                return MessageFlag.DIR_FR;
-            case MessageFlag.DIR_RF:
-                return MessageFlag.DIR_RF;
-            case MessageFlag.DIR_RR:
-                return MessageFlag.DIR_FF;
-            default:
-                throw new RuntimeException("Unrecognized direction in flipDirection: " + dir);
-        }
-    }
-    
-    public byte flipDir(byte dir){
-        switch(dir){
-            case DirectionFlag.DIR_FF:
-                return DirectionFlag.DIR_RF;
-            case DirectionFlag.DIR_FR:
-                return DirectionFlag.DIR_RR;
-            case DirectionFlag.DIR_RF:
-                return DirectionFlag.DIR_FF;
-            case DirectionFlag.DIR_RR:
-                return DirectionFlag.DIR_FR;
-            default:
-                throw new RuntimeException("Unrecognized direction in flipDirection: " + dir);
-        }
-    }
-    
-    /**
      * check if this tandem repeat can be solved
      */
     public boolean repeatCanBeMerged(){
diff --git a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/util/VertexUtil.java b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/util/VertexUtil.java
index b6ee29d..4db034e 100644
--- a/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/util/VertexUtil.java
+++ b/genomix/genomix-pregelix/src/main/java/edu/uci/ics/genomix/pregelix/util/VertexUtil.java
@@ -152,4 +152,24 @@
     public static boolean isValidRear(VertexValueWritable value){
         return isPathVertex(value) || (value.inDegree() == 1 && !isPathVertex(value));
     }
+    
+    public static boolean isVertexWithOnlyOneIncoming(VertexValueWritable value){
+        return value.inDegree() == 1 && !isPathVertex(value);
+    }
+    
+    public static boolean isVertexWithOnlyOneOutgoing(VertexValueWritable value){
+        return value.outDegree() == 1 && !isPathVertex(value);
+    }
+    
+    public static boolean isVertexWithManyIncoming(VertexValueWritable value){
+        return value.inDegree() > 1;
+    }
+    
+    public static boolean isVertexWithManyOutgoing(VertexValueWritable value){
+        return value.outDegree() > 1;
+    }
+    
+    public static boolean isActiveVertex(VertexValueWritable value){
+        return value.inDegree() == 1 || value.outDegree() == 1;
+    }
 }
diff --git a/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/JobRun/PathMergeTestSuite.java b/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/JobRun/PathMergeTestSuite.java
index 0aa9599..60a6a1b 100644
--- a/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/JobRun/PathMergeTestSuite.java
+++ b/genomix/genomix-pregelix/src/test/java/edu/uci/ics/genomix/pregelix/JobRun/PathMergeTestSuite.java
@@ -6,14 +6,14 @@
 
     public static Test suite() throws Exception {
         String pattern ="PathMerge";
-        String testSet[] = //{"2", "3", "4", "5", "6", "7", "8", "9", "head_6", "head_7"}; 
-                {
+        String testSet[] = {"2", "3", "4", "5", "6", "7", "8", "9", "head_6", "head_7",
                 "FR",
                 "RF",
                 "head_FR",
                 "head_RF",
                 "twohead_FR",
-                "twohead_RF"
+                "twohead_RF",
+                "BridgePath2"
 //                "SimplePath",
 //                "ThreeDuplicate",
 //                "head_6"