implement root entropy calculation