adjust time to wait and light threshold