changing connection object to be asyncrounous