improve class Connection