Overloaded the connect function, made connectionDetails of class
connectionDetails