endpoint extracted into an interface so tests can be done more easily
unit test for counter and minor changes based on tests