added the ability to pass in arg for connection wait time