test for long input
added mutex to socket handling
removed error code