added timeouts to connects