client connection main