make digest tree