interfaces fixed, better handling of connection