Refactored the for loop to a benign one
  - the helper functions are more cleaner w/o brackets