add tree map implementation