Hoist to beginning of loop and use more descriptive name