unified merkmod tree from scratch for the d2s