Don't like to do `var elem` within a loop