added websocket fucntionality