refactoring so we can stop/start when we run into API limits