Writing a simple code to build the connection