Correct implmentation for calBoundaryLoops; can be used for hole finding