cleaned up loop in order to be able to triage why it doesn't resolve on other versions of printf