fixed an error and added test for tallies