added socket stuff barely