added a timeout of 20s for establishing a connection