refactoring, including dealing with storing floats in integer counters