added possibility for multiple tcp connections