If we want to keep the "original" behavior and just fix it this would have to be moved inside the seq.foreach loop