correct light function