trying to figure out a nice way to do websockets