fixed up socket passing