move loop-invariant declarations out of loop
new file