a version with floats instead of decimals
store expected counts to compare with other branch
style and indentation cleanup