cleaner sample looping code