refactoring: connection is record now,  host/port added