add the connected component labeling algorithm