add timeout in connectTo