changed: connection struct structure; added: host resolution