entropy criterion added, bug still exists