buildTreeMap close to done