add tree and hash counter