working on wrapping the socket - first attempt