need to wait so light can actually switch off and light-resistor can follow