Tweaked for loop some more to add %%i