improve socket communications