websocket functionality now works correctly