And this can certainly be vectorized. Sorry for not looking into this.