Why is this outside the loop?