socket stuff
merged