bug fixing

This will not work. `v` is defined in the scope of the if statement. It is not accessible to `formatAdd`. To solve this you would use the `forEach` function of an array, to replace the `for` loop.