made brightness threshold a config option