mostly stuff for websockets