adding docs, calculated tree stats