implements some todos from WebsocketHandler