web socket implementation (in progress)