Preperations for connection