Some code refinements
  - setting it up to refactor to a for loop