You can do this outside the loop.