add control socket handling