protected static function header(EntityInterface $entity): array
    {
        error_log("calculating headers: ");
        error_log(get_class($entity));
        $first_hex = 11;
        if($entity instanceof Node) {
            if($entity instanceof Obj)
                $first_hex =  5;
            elseif($entity instanceof Actor)
                $first_hex =  4;
            elseif($entity instanceof Graph)
                $first_hex =  3;
            elseif($entity instanceof SubGraph)
                $first_hex =  2;
            else 
                $first_hex =  1;
        }
        elseif($entity instanceof Edge) {
            // order is important
            if($entity instanceof ObjOut\Mention)
                $first_hex =  10;
            elseif($entity instanceof ActorOut\Write)
                $first_hex = 8;
            elseif($entity instanceof ActorOut\Subscribe)
                $first_hex = 9;
            elseif($entity instanceof ActorOut\Read)
                $first_hex = 7;
            else
                $first_hex = 6;
        }
        return [$first_hex, rand(0,15)];
    }