looping lighting calculations for #9