added graph template connectedness checker