added C99-style initial for loop declarations