implemented connection method, but does not work yet