initial work on socket implementation