added function to calculate size of subtree of given node