Added web socket functionality