updated light sources logic