please don't refactor things like this, the original author may have a reason to use curlies, also, if and for on the same line is really bad form.

happy to merge jf you fix these changes.