Added dim light function