changes to debug entropy calculation