changed to work with flux not counts