working on wrapping the socket - first attempt
fixed conflicts