setting up to see if there was a successful connection and if not it will error out