removed global soc socket variable