Defining the Connection class