re-worked logic to reduce API calls, add failing tests support