switching to iterator over enhanced for loop for saving to YAML