This should be done outside of the loop.