implemented connection labeling