changed Node signature, moved entropy calculation to separate fn