changed the connection process