updated generateLightSubpath()