update lights code