basic web socket functionality