the reference to the array element could be cached in a local variable to save one lookup.