added handling for Client connections