treedictionary implemented