swapped out for loop for array
Merge pull request #33 from thongsav-usgs/PUBSTWO-913

swapped out for loop for array