TCP connection handling added