added tallies and entropy