first untested version of socket api