minimalistic taggedtree version implementation.