added timeout for connections