almost working, websocket is returning null for some reasons