finilizing socket work