Rather than have directly modified global state here, we can make it an implementation detail and have an interface that changes are queried through.