removed ks and added synchronous support in case of connection timeout