connection: refactoring method connect!