add diameter of binary tree and Adler-32 Hash function