connection handling implemented