attempt at creating socket take 2